void save_EEPROM_groundstart(void)
{
	// Sensor settings
	eeprom_write_word((uint16_t *)	EE_AP_OFFSET, 	airpressure_offset);
	eeprom_write_word((uint16_t *)	EE_IR_MAX, 		ir_max);

	// GPS settings
	eeprom_write_byte((uint8_t *)	EE_GPS_ENABLED, GPS_enabled);

	rc_1.save_trim();
	rc_2.save_trim();
	rc_4.save_trim();
}

void restore_EEPROM(void)
{
	// if this is a first time use
	// check_eeprom_defaults();

	// Read out user options
	// ----------------------


	airpressure_offset 				= eeprom_read_word((uint16_t *)	EE_AP_OFFSET);
	ir_max							= eeprom_read_word((uint16_t *)	EE_IR_MAX);

	GPS_enabled						= eeprom_read_byte((uint8_t *)	EE_GPS_ENABLED);

	// load home latitude, long, alt
	// -----------------------------
	home = get_wp_with_index(0);

	rc_1.load_trim();
	rc_2.load_trim();
	rc_4.load_trim();
}


void read_as_test(void)
{
	airpseed_test = eeprom_read_word((uint16_t *)	EE_AS_TEST);
	throttle_test = eeprom_read_word((uint16_t *)	EE_THR_TEST);

	Serial.printf_P(PSTR("\n\nAS:%d, THR:%d_\n"),
							airpseed_test/100,
							throttle_test);
}


void save_wp_index()
{
	eeprom_write_byte((uint8_t *)EE_WP_INDEX, wp_index);
}
